/*    */ package com.iris.egrantweb.struts2.functions;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class IrisFunctions
/*    */ {
/*    */   public static String xmlFormat(String text) {
/* 13 */     if (text == null) {
/* 14 */       return "";
/*    */     }
/* 16 */     text = text.replace("&", "&amp;");
/* 17 */     text = text.replace("<", "&lt;");
/* 18 */     text = text.replace(">", "&gt;");
/* 19 */     text = text.replace(" ", "&nbsp;");
/* 20 */     text = text.replace("\n", "<br/>");
/* 21 */     text = text.replace("'", "&#39;");
/* 22 */     text = text.replace("\"", "&quot;");
/* 23 */     text = text.replace("〇", "<span style=\"font-family: STZhongsong;\">O</span>");
/* 24 */     text = text.replaceAll("[\\x00-\\x08\\x0b-\\x0c\\x0e-\\x1f]", "");
/* 25 */     return text;
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public static String xmlFormat(String text, String keyValues, boolean defaultSetting) {
/* 38 */     if (text == null || keyValues == null) {
/* 39 */       return "";
/*    */     }
/* 41 */     String[] arrs = keyValues.split("\\|\\|");
/* 42 */     for (String arr : arrs) {
/* 43 */       String[] items = arr.split("==");
/* 44 */       if (items.length == 2) {
/* 45 */         text = text.replace(items[0], items[1]);
/*    */       }
/*    */     } 
/* 48 */     if (defaultSetting) {
/* 49 */       text = text.replace("&", "&amp;");
/* 50 */       text = text.replace("<", "&lt;");
/* 51 */       text = text.replace(">", "&gt;");
/* 52 */       text = text.replace("\n", "<br/>");
/* 53 */       text = text.replace("'", "&#39;");
/* 54 */       text = text.replace("\"", "&quot;");
/* 55 */       text = text.replaceAll("[\\x00-\\x08\\x0b-\\x0c\\x0e-\\x1f]", "");
/*    */     } 
/* 57 */     return text;
/*    */   }
/*    */   
/*    */   public static void main(String[] args) {
/* 61 */     System.out.println(xmlFormat("你是\"\"'' nnnn手动〇〇28\n", " ==ss||〇==O", true));
/*    */   }
/*    */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\web\struts2\functions\IrisFunctions.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */